home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 47 / 047.d81 / mathers of unive (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  214 lines

  1. 5 ifa=.thena=1:load"mathers.spr",8,1
  2. 10 poke53248+21,.
  3. 15 poke55,.:poke56,48:clr
  4. 20 gosub30:print"[147]":pokev,6:pokevb,6:goto50
  5. 30 o$=" ":t$="   ":l$="     ":p$=l$+"  "
  6. 35 j$=p$+"  ":q$=j$+"  ":s$=q$+"    "
  7. 40 v=53280:vb=v+1:k=1024:s=54272:c$="correct"
  8. 45 i$="incorrect":d$="":return
  9. 50 j=j+1:x=int(rnd(1)*999)+k:p=x+s:pokex,46:pokep,1:ifj<100then50
  10. 60 poke1149,81:poke1577,81:poke1692,81:poke55421,8:poke55849,5:poke55964,2
  11. 70 printd$"[152] [155]  [223][169]  [146][152][223][155]    [146][152][223][155]     [146][152][223][155] ";
  12. 75 print"[146][152][223] [155] [146][152][223][155]    [146][152][223][155]    [146][152][223]";
  13. 80 print"[155]    [146][152][223]"
  14. 90 print" [155] [146][223]  [146][169] [146]  [146]   [146]    [146]   ";
  15. 95 print" [146]   [146]  [146]     [146]   [146]  [146]   [152][167]"
  16. 100 print" [155] [146] [223][169]  [146]     [146]  [152] [155] [146]  [152] [155]    [146]    [146]     [146][169]     [152][146][167]"
  17. 110 print" [155] [146]   [152][169][155] [146]  [146]   [146]  [152] [155] [146]  ";
  18. 115 print"[152] [155] [146]   [146]  [146]     [146] [223][223][146]     [152][146][167]"
  19. 120 print" [155] [146]  [152][223] [155] [146]  [146]   [146]  [152] [155] [146]  [152] ";
  20. 125 print"[155] [146]   [146]     [146]  [146]   [146]     [152][146][167]"
  21. 130 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][155]"
  22. 140 print"[155]"s$"[157]o f   t h e"
  23. 150 print"   [146]  [146]   [223] [146]   [146] [223][223][169][146][169]  [192][192][146]   [192] [146]   [192][192][146]   [192][192][146]"
  24. 160 print"     [146]   [146][223] [146]   [146]  [223][169]   [192][192][146]   [146] [188][146]  [192][192] [146]   [192][192][146]":poke198,.
  25. 170 x=int(rnd(1)*990)+k:z=peek(x):ifz<>32orx>1263andx<1464then170
  26. 175 geta$:ifa$<>""then200
  27. 180 j=x+s:pokex,46:pokej,1:forp=1to50:next
  28. 185 pokej,6:pokex,32:forp=1to100:next
  29. 190 ifm<30thenm=m+1:goto170
  30. 200 pokev,0:pokevb,0:print"[147] t r a i n i n g   m i s s i o n  xxvii"
  31. 210 print"you are about to undergo a trial run  in"
  32. 220 print"the space pilot training  program.  your"
  33. 230 print"mission is to  make a successful landing"
  34. 240 print"on a nearby asteroid.to do this you must"
  35. 250 print"accurately calculate the correct  pounds"
  36. 260 print"of fuel needed to fire the main rockets."
  37. 270 print"if your calculations are inaccurate, the"
  38. 280 print"rockets will not fire, fuel will be lost"
  39. 290 print"and gravity will pull on the ship (spend"
  40. 300 print"all  your  fuel and your ship will crash"
  41. 310 print"on the launching platform)....good luck!"
  42. 320 printj$"press any key to begin";
  43. 330 getf$:iff$=""then330
  44. 340 print"[147]":gosub30:j=24:jj=226:m=247
  45. 345 dimhf(18),hh(18),lf(18),ll(18),dr(18)
  46. 350 fori=1to18:readhf(i),hh(i),lf(i),ll(i),dr(i):next
  47. 355 fori=1to4:readqc(i):next
  48. 360 fori=1to7:readrd(i),rp(i),rr(i),rn(i):next:pl=-1:kf=183
  49. 370 print"[147]","  pick a level!",,"     level"l$;
  50. 375 print" most difficult problem"
  51. 380 print"1) beginner i"q$"  5*5",,"2) beginner ii"q$" 9*5"
  52. 390 print"3) beginner iii"q$"9*9",,"4) junior i"s$"40*9"
  53. 400 print"5) junior ii"s$"[157]100*9","6) advanced"s$"100*99"
  54. 410 print"7) senior"s$"  1000*999",
  55. 415 print"8) to change and set the second number"
  56. 416 print"9) exit"
  57. 430 print" multiply numbers for highest dividend";:poke198,0
  58. 440 getb$:a=val(b$):ifa<1ora>9then440
  59. 445 ifa=9then60000
  60. 450 h=7:ifa=8then1200
  61. 460 print"[147]"d$j$"select a category!":print,"1) addition"
  62. 470 print,"2) subtraction":print,"3) multiplication"
  63. 475 print,"4) division"
  64. 480 print,"5) combination 1 & 2":print,"6) combination 3 & 4":poke198,0
  65. 490 geta$:b=val(a$):ifb<1orb>6then490
  66. 500 gosub1750:x=(rnd(1)*ti):ifa>6orpl>99thenh=6
  67. 510 print"[147]":pokev,7:g=53265:pokeg,peek(g)and239:ifb=5orb=6thenco=b-3
  68. 520 x=int(rnd(1)*986)+1037:ifx>1183andx<1224then520
  69. 530 ifx>1263andx<1304then520
  70. 540 p=x+s:z=z+1:pokex,46:pokep,1:ifz<61then520
  71. 550 print:printd$d$d$d$d$" e"j$"fuel"j$"[157]f":ifb=4thenrt=1
  72. 560 print"                         [146] .   [152][164][175][185][185][185][175][164]";
  73. 570 vc=13*4096:pokevc+21,49:pokevc+29,112:poke2040,192:poke2041,193
  74. 580 poke2042,194:poke2043,195:poke2044,196:poke2045,197:poke2046,198
  75. 590 pokevc+16,95:pokevc+0,j:pokevc+1,jj:pokevc+2,j:pokevc+3,m:pokevc+4,j
  76. 600 pokevc+5,m:pokevc+6,j:pokevc+7,m:pokevc+8,12:pokevc+9,50:pokevc+10,kf
  77. 610 pokevc+11,244:pokevc+12,12:pokevc+13,227:pokevc+39,11:pokevc+40,7
  78. 620 pokevc+41,2:pokevc+42,2:pokevc+43,3:pokevc+44,0:pokevc+45,11:pokev,5
  79. 630 pokev,0:pokevb,0
  80. 640 gosub1690:pokeg,peek(g)or16
  81. 650 y=-1:y$="":x=0:xx=0:t=t+1:ifcothengosub1080
  82. 660 gosub960:gosub1690:print"[151]enter answer-":print"press return":print
  83. 670 ifpl>-1thenxx=pl
  84. 680 ifrt>0orco=4then1090
  85. 690 gosub790:f=x:gosub710:gosub720:printt$" "x:f=xx:gosub710:gosub720
  86. 700 gosub750:gosub710:printspc(h)"[192][192][192][192]":gosub710
  87. 705 f=n:gosub720:gosub970:goto810
  88. 710 print:print"[145]";:return
  89. 720 printt$;:iff<10thenprinto$;
  90. 730 nx=99:fori=1to4:iff>nxthenprint"[157]";:nx=nx*10+9
  91. 740 next:return
  92. 750 printt$;:ifb=1thenprint"+"xx:n=x+xx
  93. 760 ifb=2thenprint"-"xx:n=x-xx
  94. 770 ifb=3thenprint"x"xx:n=x*xx
  95. 780 return
  96. 790 ifxx>xthenzx=x:x=xx:xx=zx
  97. 800 return
  98. 810 kf=kf-4:ifkf<9thenkf=9
  99. 820 pokevc+10,kf:ify<>nthenwr=wr+1:goto920
  100. 830 print""c$"!":ri=ri+1:jj=jj-7:m=jj+21:pokes+3,1:pokes+6,249
  101. 840 pokes+1,6:pokes+4,129:pokevc+21,57
  102. 850 tp=tp+1:forp=1to55:next:pokevc+21,61:iftp=11then880
  103. 860 forp=1to55:next:pokevc+21,59:iftp=13then890
  104. 870 goto850
  105. 880 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:goto850
  106. 890 pokes+4,0:pokevc+21,49
  107. 895 ifjj<41thengosub1690:gosub1040:print"[158]":goto1650
  108. 900 ifkf=9then1580
  109. 910 tp=0:forp=1to500:next:goto650
  110. 920 print"sorry....":print"the total is":print"[156]"spc(8)n
  111. 925 ifkf=9then1580
  112. 930 if(ri>.)thenjj=jj+10:m=jj+21:ifjj>225thenjj=226:goto1620
  113. 940 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:gosub1660
  114. 945 forp=1to10:pokes,lf
  115. 950 pokes+1,hf:pokes+4,33:lf=lf-1:hf=hf-1:next
  116. 955 pokes+4,0:forp=1toz:next:goto910
  117. 960 x=int(rnd(1)*rd(a))+rp(a):xx=int(rnd(1)*rr(a))+rn(a):return
  118. 970 y$="":poke198,0:ifa=8thenprint"? ";:goto990
  119. 980 printt$"? [144]";
  120. 990 wait198,15:getz$:z=asc(z$):ifz>47andz<59theny$=y$+z$:print""z$;
  121. 1000 zl=len(y$):ifzl>6thenz=20:goto1020
  122. 1010 ifz=13andzltheny=val(y$):printo$:return
  123. 1020 ifz=20andzltheny$=left$(y$,zl-1):print"[144][157] [146][157]";
  124. 1030 goto990
  125. 1040 ift<2then1070
  126. 1050 printt$"[152]out of":print""t"[152]problems":printt$"you had"
  127. 1060 print""ri"[152]"c$" and":print""wr"[152]"i$:printt$"answers!":return
  128. 1070 printd$"[152]you never got",,,"off the ground!",,,"what happened??"
  129. 1075 return
  130. 1080 i=co:co=qc(i):b=qc(i):return
  131. 1090 ifxx=0thenxx=int(rnd(1)*5)+1
  132. 1100 f=xx:print"":gosub1130:iff>9thenprinto$;:iff>99thenprinto$;
  133. 1110 printt$"[213][192][192][192][192][192][192][192]":gosub1130:f=x*xx:printxx"[221]"f:print:print"[157][157][145][145][145][145]"
  134. 1120 gosub1160:printt$;:gosub970:n=x:print"":goto810
  135. 1130 print"  ";:iff<10thenprinto$;
  136. 1140 iff>99thenprint"[157]";:iff>999thenprint"[157]";
  137. 1150 return
  138. 1160 iff<10thenreturn
  139. 1170 xy=len(str$(f)):l=len(str$(x)):ifxy=lthenreturn
  140. 1180 fori=1to3:ifl+(i)<=xythenprinto$;
  141. 1190 next:return
  142. 1200 print"[147] enter the number (from 0 to 999) which",t$
  143. 1205 print"you wish to ";
  144. 1210 print"appear in the problems",
  145. 1215 print"  a zero in problems of division will"
  146. 1220 print"  produce a random number from 1 to 5",s$"[157][151]press return"
  147. 1230 print"number";:gosub970:pl=y:ifpl<0orpl>999then1200
  148. 1240 printl$" you have selected number"pl:forp=1to2000:next:goto370
  149. 1250 pokevc+21,0:pokeg,peek(g)and239:print"[147]"ri;c$s$" "wr;i$
  150. 1260 ifa<7andb<3orb=5then1340
  151. 1270 printd$l$"  you have met the requirements"
  152. 1280 printq$"to qualify you as"
  153. 1290 ifzs=1thenprint" a kite flyer!! you need more training.":goto1330
  154. 1300 ift<30thenprint"  a topnotch pilot! congratulations!!"
  155. 1310 ift>29andt<38thenprint"    a good pilot with high potential."
  156. 1320 ift>37thenprintp$"a co-pilot.  keep trying!!"
  157. 1330 print"":go